<script type="text/javascript">
	
	function batal(){
		document.location.href = '<?=base_url().'index.php/master_akun'?>';
	}
	
</script>

  <script>
  $(document).ready(function(){
    $("#form1").validate({
  rules: {
    kode_akun: {
      required: true,
	  number: true,
	  minlength:9,
	  maxlength:9
    }
	 nama_akun: {
      required: true
    }
  }
});
  });
  </script>
  <style>#kode_akun { margin-left: .5em; float: left; }
  	#kode_akun, label { float: left; font-family: Arial, Helvetica, sans-serif; font-size: small; }
	#nama_akun { margin-left: .5em; float: left; }
  	#nama_akun, label { float: left; font-family: Arial, Helvetica, sans-serif; font-size: small; }
	br { clear: both; }
	input { border: 1px solid black; margin-bottom: .5em;  }
	input.error { border: 1px solid red; }
	label.error { 
		padding-left: 16px;
		margin-left: .3em;
                color: red;
	}
	label.valid { 
		display: block;
		width: 16px;
		height: 16px;
	}
</style>

	<?php 
		if(validation_errors())
		{
	?>
			<ul class="message error grid_12">
				<li><?=validation_errors()?></li>
				<li class="close-bt"></li>
			</ul>	
	<?php
		} 
	?>

		<?php
			$attributes = array('name' => 'form1', 'id' => 'form1', 'class'=>'block-content form');
			echo form_open('master_akun/insert', $attributes);
		?>
			
			<div id="page-heading"><h1>Tambah Data Akun</h1></div>
			<table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
				<tr>
					<th rowspan="3" class="sized"><img src="<?php echo base_url() ?>asset/admin/images/shared/side_shadowleft.jpg" width="20" height="300" alt="" /></th>
					<th class="topleft"></th>
					<td id="tbl-border-top">&nbsp;</td>
					<th class="topright"></th>
					<th rowspan="3" class="sized"><img src="<?php echo base_url() ?>asset/admin/images/shared/side_shadowright.jpg" width="20" height="300" alt="" /></th>
				</tr>	
				
				<tr>
					<td id="tbl-border-left"></td>
					<td>
					<!--  start content-table-inner -->
					<div id="content-table-inner">
					<div id="table-content">
					<table border="0" width="100%" cellpadding="0" cellspacing="0">
					<tr valign="top">
					<td>
						<!--  start step-holder -->
						<div id="step-holder">
							<div class="step-no">1</div>
							<div class="step-light-left"><?php echo anchor('master_akun/index', 'List Master Akun'); ?></div>
							<div class="step-light-right">&nbsp;</div>
							<div class="step-no-off">2</div>
							<div class="step-dark-left">Tambah Master Akun</div>
							<div class="step-dark-round">&nbsp;</div>
							<div class="clear"></div>
						</div>
						<!--  end step-holder -->
					
						<!-- start id-form -->
						<br/><br/>
						<table border="0" cellpadding="0" cellspacing="0"  id="id-form">
						<tr>
							<th valign="top">Kode Akun (*) :</th>
							<td><input type="text" name="kode_akun" id="kode_akun" value="<?=set_value('kode_akun')?>" class="inp-form"></td>
							<td></td>
						</tr>
						
						<tr>
							<th valign="top">Nama Akun (*) :</th>
							<td><input type="text" name="nama_akun" id="nama_akun" value="<?=set_value('nama_akun')?>" class="inp-form"></td>
							<td></td>
						</tr>
						<tr>
							<th>&nbsp;</th>
							<td valign="top">
								<input type="submit" value="Simpan" class="form-submit" />
								<input type="reset" value="Batal" class="form-reset" onclick="javascript:batal();" />
							</td>
							<td></td>
						</tr>
						</table>
						<!-- end id-form  -->

					</td>
					</tr>
				
					</table>
					<div class="clear"></div>
					</div>
					</div>
		
					</td>
					<td id="tbl-border-right"></td>
				</tr>
				<tr>
					<td class="sized bottomleft"></td>
					<td height="15px" id="tbl-border-bottom"></td>
					<td class="sized bottomright"></td>
				</tr>
				</table> 
			</form>
			
		 